/**
 */
package gatperdut.chato.model.Chato.impl;

import gatperdut.chato.model.Chato.Chato;
import gatperdut.chato.model.Chato.ChatoPackage;

import gatperdut.chato.model.Chato.Container.BotContainer;
import gatperdut.chato.model.Chato.Container.CraftContainer;
import gatperdut.chato.model.Chato.Container.DoorContainer;
import gatperdut.chato.model.Chato.Container.ItemContainer;
import gatperdut.chato.model.Chato.Container.ItemTemplateContainer;
import gatperdut.chato.model.Chato.Container.PlayerContainer;
import gatperdut.chato.model.Chato.Container.RoomContainer;

import org.eclipse.emf.common.notify.NotificationChain;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.internal.cdo.CDOObjectImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Chato</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getItemContainer <em>Item Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getItemTemplateContainer <em>Item Template Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getRoomContainer <em>Room Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getPlayerContainer <em>Player Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getDoorContainer <em>Door Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getBotContainer <em>Bot Container</em>}</li>
 *   <li>{@link gatperdut.chato.model.Chato.impl.ChatoImpl#getCraftContainer <em>Craft Container</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class ChatoImpl extends CDOObjectImpl implements Chato {
	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	protected ChatoImpl() {
        super();
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected EClass eStaticClass() {
        return ChatoPackage.Literals.CHATO;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	protected int eStaticFeatureCount() {
        return 0;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ItemContainer getItemContainer() {
        return (ItemContainer)eDynamicGet(ChatoPackage.CHATO__ITEM_CONTAINER, ChatoPackage.Literals.CHATO__ITEM_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetItemContainer(ItemContainer newItemContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newItemContainer, ChatoPackage.CHATO__ITEM_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setItemContainer(ItemContainer newItemContainer) {
        eDynamicSet(ChatoPackage.CHATO__ITEM_CONTAINER, ChatoPackage.Literals.CHATO__ITEM_CONTAINER, newItemContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public ItemTemplateContainer getItemTemplateContainer() {
        return (ItemTemplateContainer)eDynamicGet(ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER, ChatoPackage.Literals.CHATO__ITEM_TEMPLATE_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetItemTemplateContainer(ItemTemplateContainer newItemTemplateContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newItemTemplateContainer, ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setItemTemplateContainer(ItemTemplateContainer newItemTemplateContainer) {
        eDynamicSet(ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER, ChatoPackage.Literals.CHATO__ITEM_TEMPLATE_CONTAINER, newItemTemplateContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public RoomContainer getRoomContainer() {
        return (RoomContainer)eDynamicGet(ChatoPackage.CHATO__ROOM_CONTAINER, ChatoPackage.Literals.CHATO__ROOM_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetRoomContainer(RoomContainer newRoomContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newRoomContainer, ChatoPackage.CHATO__ROOM_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setRoomContainer(RoomContainer newRoomContainer) {
        eDynamicSet(ChatoPackage.CHATO__ROOM_CONTAINER, ChatoPackage.Literals.CHATO__ROOM_CONTAINER, newRoomContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public PlayerContainer getPlayerContainer() {
        return (PlayerContainer)eDynamicGet(ChatoPackage.CHATO__PLAYER_CONTAINER, ChatoPackage.Literals.CHATO__PLAYER_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetPlayerContainer(PlayerContainer newPlayerContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newPlayerContainer, ChatoPackage.CHATO__PLAYER_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setPlayerContainer(PlayerContainer newPlayerContainer) {
        eDynamicSet(ChatoPackage.CHATO__PLAYER_CONTAINER, ChatoPackage.Literals.CHATO__PLAYER_CONTAINER, newPlayerContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public DoorContainer getDoorContainer() {
        return (DoorContainer)eDynamicGet(ChatoPackage.CHATO__DOOR_CONTAINER, ChatoPackage.Literals.CHATO__DOOR_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetDoorContainer(DoorContainer newDoorContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newDoorContainer, ChatoPackage.CHATO__DOOR_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setDoorContainer(DoorContainer newDoorContainer) {
        eDynamicSet(ChatoPackage.CHATO__DOOR_CONTAINER, ChatoPackage.Literals.CHATO__DOOR_CONTAINER, newDoorContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public BotContainer getBotContainer() {
        return (BotContainer)eDynamicGet(ChatoPackage.CHATO__BOT_CONTAINER, ChatoPackage.Literals.CHATO__BOT_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetBotContainer(BotContainer newBotContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newBotContainer, ChatoPackage.CHATO__BOT_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setBotContainer(BotContainer newBotContainer) {
        eDynamicSet(ChatoPackage.CHATO__BOT_CONTAINER, ChatoPackage.Literals.CHATO__BOT_CONTAINER, newBotContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public CraftContainer getCraftContainer() {
        return (CraftContainer)eDynamicGet(ChatoPackage.CHATO__CRAFT_CONTAINER, ChatoPackage.Literals.CHATO__CRAFT_CONTAINER, true, true);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public NotificationChain basicSetCraftContainer(CraftContainer newCraftContainer, NotificationChain msgs) {
        msgs = eDynamicInverseAdd((InternalEObject)newCraftContainer, ChatoPackage.CHATO__CRAFT_CONTAINER, msgs);
        return msgs;
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	public void setCraftContainer(CraftContainer newCraftContainer) {
        eDynamicSet(ChatoPackage.CHATO__CRAFT_CONTAINER, ChatoPackage.Literals.CHATO__CRAFT_CONTAINER, newCraftContainer);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
        switch (featureID) {
            case ChatoPackage.CHATO__ITEM_CONTAINER:
                return basicSetItemContainer(null, msgs);
            case ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER:
                return basicSetItemTemplateContainer(null, msgs);
            case ChatoPackage.CHATO__ROOM_CONTAINER:
                return basicSetRoomContainer(null, msgs);
            case ChatoPackage.CHATO__PLAYER_CONTAINER:
                return basicSetPlayerContainer(null, msgs);
            case ChatoPackage.CHATO__DOOR_CONTAINER:
                return basicSetDoorContainer(null, msgs);
            case ChatoPackage.CHATO__BOT_CONTAINER:
                return basicSetBotContainer(null, msgs);
            case ChatoPackage.CHATO__CRAFT_CONTAINER:
                return basicSetCraftContainer(null, msgs);
        }
        return super.eInverseRemove(otherEnd, featureID, msgs);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
        switch (featureID) {
            case ChatoPackage.CHATO__ITEM_CONTAINER:
                return getItemContainer();
            case ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER:
                return getItemTemplateContainer();
            case ChatoPackage.CHATO__ROOM_CONTAINER:
                return getRoomContainer();
            case ChatoPackage.CHATO__PLAYER_CONTAINER:
                return getPlayerContainer();
            case ChatoPackage.CHATO__DOOR_CONTAINER:
                return getDoorContainer();
            case ChatoPackage.CHATO__BOT_CONTAINER:
                return getBotContainer();
            case ChatoPackage.CHATO__CRAFT_CONTAINER:
                return getCraftContainer();
        }
        return super.eGet(featureID, resolve, coreType);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eSet(int featureID, Object newValue) {
        switch (featureID) {
            case ChatoPackage.CHATO__ITEM_CONTAINER:
                setItemContainer((ItemContainer)newValue);
                return;
            case ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER:
                setItemTemplateContainer((ItemTemplateContainer)newValue);
                return;
            case ChatoPackage.CHATO__ROOM_CONTAINER:
                setRoomContainer((RoomContainer)newValue);
                return;
            case ChatoPackage.CHATO__PLAYER_CONTAINER:
                setPlayerContainer((PlayerContainer)newValue);
                return;
            case ChatoPackage.CHATO__DOOR_CONTAINER:
                setDoorContainer((DoorContainer)newValue);
                return;
            case ChatoPackage.CHATO__BOT_CONTAINER:
                setBotContainer((BotContainer)newValue);
                return;
            case ChatoPackage.CHATO__CRAFT_CONTAINER:
                setCraftContainer((CraftContainer)newValue);
                return;
        }
        super.eSet(featureID, newValue);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public void eUnset(int featureID) {
        switch (featureID) {
            case ChatoPackage.CHATO__ITEM_CONTAINER:
                setItemContainer((ItemContainer)null);
                return;
            case ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER:
                setItemTemplateContainer((ItemTemplateContainer)null);
                return;
            case ChatoPackage.CHATO__ROOM_CONTAINER:
                setRoomContainer((RoomContainer)null);
                return;
            case ChatoPackage.CHATO__PLAYER_CONTAINER:
                setPlayerContainer((PlayerContainer)null);
                return;
            case ChatoPackage.CHATO__DOOR_CONTAINER:
                setDoorContainer((DoorContainer)null);
                return;
            case ChatoPackage.CHATO__BOT_CONTAINER:
                setBotContainer((BotContainer)null);
                return;
            case ChatoPackage.CHATO__CRAFT_CONTAINER:
                setCraftContainer((CraftContainer)null);
                return;
        }
        super.eUnset(featureID);
    }

	/**
     * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
     * @generated
     */
	@Override
	public boolean eIsSet(int featureID) {
        switch (featureID) {
            case ChatoPackage.CHATO__ITEM_CONTAINER:
                return getItemContainer() != null;
            case ChatoPackage.CHATO__ITEM_TEMPLATE_CONTAINER:
                return getItemTemplateContainer() != null;
            case ChatoPackage.CHATO__ROOM_CONTAINER:
                return getRoomContainer() != null;
            case ChatoPackage.CHATO__PLAYER_CONTAINER:
                return getPlayerContainer() != null;
            case ChatoPackage.CHATO__DOOR_CONTAINER:
                return getDoorContainer() != null;
            case ChatoPackage.CHATO__BOT_CONTAINER:
                return getBotContainer() != null;
            case ChatoPackage.CHATO__CRAFT_CONTAINER:
                return getCraftContainer() != null;
        }
        return super.eIsSet(featureID);
    }

} //ChatoImpl
